package com.openrange.dukes.Input 
{
	
	import com.openrange.dukes.Dukes.Duke;
	import org.flixel.*;
	 
	public class PlayerInput extends BaseInput
	{
		
		public function PlayerInput() 
		{
			
		}
		
		override public function getInput(unit:Duke):void
		{			
			if ((FlxG.keys.justPressed("LEFT")))
			{
				unit.move( -1, 0);
			}
			else if ((FlxG.keys.justPressed("RIGHT")))
			{
				unit.move( 1, 0);
			}
			else if ((FlxG.keys.justPressed("UP")))
			{
				unit.move( 0, -1);
			}
			else if ((FlxG.keys.justPressed("DOWN")))
			{
				unit.move( 0, 1);
			}
			
		}
		
	}

}